package com.ulic.customerManApplication.memberenjoymodule.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ulic.customerManApplication.memberenjoymodule.bo.MemberEnjoyActivity;
import com.ulic.customerManApplication.memberenjoymodule.dao.MemberEnjoyDao;
import com.ulic.customerManApplication.memberenjoymodule.service.MemberEnjoyService;
import com.ulic.customerManApplication.memberenjoymodule.vo.MemberEnjoyVO;
import com.ulic.customerManApplication.pager.PagerModel;
@Component("memberEnjoyService")
public class MemberEnjoyServiceImpl implements MemberEnjoyService {

	private MemberEnjoyDao memberEnjoyDao;
	
	public MemberEnjoyDao getMemberEnjoyDao() {
		return memberEnjoyDao;
	}
    @Resource
	public void setMemberEnjoyDao(MemberEnjoyDao memberEnjoyDao) {
		this.memberEnjoyDao = memberEnjoyDao;
	}

	@Override
	public void addMemberEnjoyActivities(
			List<MemberEnjoyActivity> memberEnjoyActivities) throws Exception {
		memberEnjoyDao.insertMemberEnjoyActivities(memberEnjoyActivities);
	}

	@Override
	public void addMemberEnjoyActivity(MemberEnjoyActivity memberEnjoyActivity)
			throws Exception {
		memberEnjoyDao.insertMemberEnjoyActivity(memberEnjoyActivity);
	}


	@Override
	public MemberEnjoyActivity findMemberEnjoyActivity(int id) {
		return memberEnjoyDao.getMemberEnjoyActivity(id);
	}

	@Override
	public void modifyMemberEnjoyActivity(
			MemberEnjoyActivity memberEnjoyActivity) throws Exception {
		memberEnjoyDao.updateMemberEnjoyActivity(memberEnjoyActivity);
	}

	@Override
	public void removeMemberEnjoyActivity(
			MemberEnjoyActivity memberEnjoyActivity) throws Exception {
		memberEnjoyDao.deleteMemberEnjoyActivity(memberEnjoyActivity);
	}
	@Override
	public PagerModel findMemberEnjoyActivities(int curPage) {
		return memberEnjoyDao.getMemberEnjoyActivities(curPage);
	}
	@Override
	public PagerModel findMemberEnjoyActivities(
			MemberEnjoyVO memberEnjoyVO, int curPage) {
		return memberEnjoyDao.getMemberEnjoyActivities(memberEnjoyVO, curPage);
	}
	@Override
	public PagerModel findMemberEnjoyActivities(MemberEnjoyVO memberEnjoyVO,
			int curPage, int totalNum) {
		return memberEnjoyDao.getMemberEnjoyActivities(memberEnjoyVO, curPage, totalNum);
	}

}
